import http from "@/utils/request";
export default {
	user: {
		info: {
			url: `/app/user/info`,
			name: "获取用户信息",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		edit: {
			url: `/app/user/update`,
			name: "编辑用户信息",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		balance: {
			url: `/app/user/account`,
			name: "获取用户余额",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		bind: {
			url: `/app/user/bind`,
			name: "绑定邀请人",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		bindIdentityCard: {
			url: `/app/user/bindIdentityCard`,
			name: "绑定身份证",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		mergeUser: {
			url: `/app/user/mergeUser`,
			name: "合并用户",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		searchAgent: {
			url: `/app/user/searchAgent`,
			name: "搜索代理",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		onlineClasses: {
			url: `/app/user/getUserOnlineClassesList`,
			name: "获取我的课程",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
	},
	address: {
		list: {
			url: `/app/user/getUserAddress`,
			name: "获取地址列表",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		edit: {
			url: `/app/user/setUserAddress`,
			name: "编辑地址",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		delete: {
			url: `/app/user/delUserAddress`,
			name: "删除地址",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
	},
	account: {
		list: {
			url: `/app/user/auxiliaryNumberList`,
			name: "获取关联账户列表",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		default: {
			url: `/app/user/setDefaultAuxiliaryNumber`,
			name: "设置主账户",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		bind: {
			url: `/app/user/addAuxiliaryNumber`,
			name: "绑定账户",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		unbind: {
			url: `/app/user/unbindAuxiliaryNumber`,
			name: "解绑账户",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
	},
	cart: {
		list: {
			url: `/app/cart/getUserCart`,
			name: "获取购物车列表",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		add: {
			url: `/app/cart/addUserCart`,
			name: "添加购物车",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		delete: {
			url: `/app/cart/delUserCart`,
			name: "删除购物车",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
	},
	offline: {
		list: {
			url: `/app/user/getUserOfflineClassesList`,
			name: "获取报名记录列表",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		detail: {
			url: `/app/user/getUserOfflineClassesDetail`,
			name: "获取报名记录详情",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
	},
	coupon: {
		list: {
			url: `/app/coupon/mylist`,
			name: "获取我的优惠券",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		detail: {
			url: `/app/coupon/detail`,
			name: "获取优惠券详情",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		receive: {
			url: `/app/coupon/receive`,
			name: "领取优惠券",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		searchUser: {
			url: `/app/user/searchUser`,
			name: "搜索赠送用户",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		give: {
			url: `/app/coupon/give`,
			name: "赠送优惠券",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
	},
	service: {
		list: {
			url: `/app/user/getUserServiceList`,
			name: "获取服务记录列表",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		detail: {
			url: `/app/user/getUserServiceDetail`,
			name: "获取服务记录详情",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
		fill: {
			url: `/app/user/storeUserService`,
			name: "补充服务记录",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		active: {
			url: `/app/user/activationUserService`,
			name: "激活服务记录",
			async post(data = {}) {
				return await http.post(this.url, data);
			},
		},
		completed: {
			url: `/app/user/completeUserService`,
			name: "完成服务记录",
			async get(data = {}) {
				return await http.get(this.url, data);
			},
		},
	},
};
